package com.steria.workshop.android.yrapp.lib.model;

import java.util.Date;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;

public class WeatherPoint implements Parcelable {

	private Date date;
	private double temperature;
	private double windDirection;
	private double windSpeed;
	private String windSpeedName;
	private double humidity;
	private double pressure;
	private double cloudiness;
	private double fog;
	private double lowClouds;
	private double mediumClouds;
	private double highClouds;
	
	public WeatherPoint() {
	}
	
	private WeatherPoint(Parcel p) {
		date = new Date(p.readLong());
		temperature = p.readDouble();
		windDirection = p.readDouble();
		windSpeed = p.readDouble();
		windSpeedName = p.readString();
		humidity = p.readDouble();
		pressure = p.readDouble();
		cloudiness = p.readDouble();
		fog = p.readDouble();
		lowClouds = p.readDouble();
		mediumClouds = p.readDouble();
		highClouds = p.readDouble();
	}
	
	public Bundle getBundle() {
		Bundle bundle = new Bundle();
		bundle.putDouble("temperature", temperature);
		bundle.putString("windSpeedName", windSpeedName);
		return bundle;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public double getTemperature() {
		return temperature;
	}

	public void setTemperature(double temperature) {
		this.temperature = temperature;
	}

	public double getWindDirection() {
		return windDirection;
	}

	public void setWindDirection(double windDirection) {
		this.windDirection = windDirection;
	}

	public double getWindSpeed() {
		return windSpeed;
	}

	public void setWindSpeed(double windSpeed) {
		this.windSpeed = windSpeed;
	}

	public String getWindSpeedName() {
		return windSpeedName;
	}

	public void setWindSpeedName(String windSpeedName) {
		this.windSpeedName = windSpeedName;
	}

	public double getHumidity() {
		return humidity;
	}

	public void setHumidity(double humidity) {
		this.humidity = humidity;
	}

	public double getPressure() {
		return pressure;
	}

	public void setPressure(double pressure) {
		this.pressure = pressure;
	}

	public double getCloudiness() {
		return cloudiness;
	}

	public void setCloudiness(double cloudiness) {
		this.cloudiness = cloudiness;
	}

	public double getFog() {
		return fog;
	}

	public void setFog(double fog) {
		this.fog = fog;
	}

	public double getLowClouds() {
		return lowClouds;
	}

	public void setLowClouds(double lowClouds) {
		this.lowClouds = lowClouds;
	}

	public double getMediumClouds() {
		return mediumClouds;
	}

	public void setMediumClouds(double mediumClouds) {
		this.mediumClouds = mediumClouds;
	}

	public double getHighClouds() {
		return highClouds;
	}

	public void setHighClouds(double highClouds) {
		this.highClouds = highClouds;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeLong(date.getTime());
		dest.writeDouble(temperature);
		dest.writeDouble(windDirection);
		dest.writeDouble(windSpeed);
		dest.writeString(windSpeedName);
		dest.writeDouble(humidity);
		dest.writeDouble(pressure);
		dest.writeDouble(cloudiness);
		dest.writeDouble(fog);
		dest.writeDouble(lowClouds);
		dest.writeDouble(mediumClouds);
		dest.writeDouble(highClouds);
	}
	
	public static final Parcelable.Creator<WeatherPoint> CREATOR = new Parcelable.Creator<WeatherPoint>() {

		public WeatherPoint createFromParcel(Parcel source) {
			return null;
		}

		public WeatherPoint[] newArray(int size) {
			return null;
		}
	};

	public int describeContents() {
		return 0;
	}
}
